<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$fuente = fopen('http://www.editorialmegabyte.com', 'r');
$dest1  = fopen('primer1k.html', 'w');
$dest2  = fopen('resto.txt', 'w');
$N_bit = 5321;
echo "copia de archivo";
echo stream_copy_to_stream($fuente, $dest1, $N_bit) . " bytes copiados a primer1k.txt\n";
echo stream_copy_to_stream($fuente, $dest2) . " bytes copiados a resto.txt\n";
?>
